package centerberg.game;

import java.awt.Graphics2D;

/**
 * Main menu.
 * 
 * @author Andreas Svanberg
 */
public class MainMenu extends Menu
{
    /**
     * Creates a new main menu.
     */
    public MainMenu()
    {
        super("Main menu");
        
        Button startButton = new Button("Start");
        startButton.setAction(new Action() {
            public void execute() {
                MenuSystem.showMenu(new LevelSelectMenu());
            }
        });
        buttons.add(startButton);
        
        Button quitButton = new Button("Quit");
        quitButton.setAction(new Action() {
            public void execute() {
                System.exit(0);
            }
        });
        buttons.add(quitButton);
    }
    
    /**
     * {@inheritDoc}
     */
    protected int draw(Graphics2D g)
    {
        return 150;
    }
}